'''
Created on 2012-3-26
主要用于测试finally
@author: yhb
'''

try:
    
    file = open('1.txt', 'r')

    while True:
    
        content = file.readline()
        if len(content) == 0:
            break
    
        print(content)
    
except :
    print('error')
    
finally:
    file.close()
    print('关闭文件了')
